package newsDemo.service.Impl;

import newsDemo.mapper.newsMapper;
import newsDemo.pojo.news;
import newsDemo.service.newsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class newsServiceImpl implements newsService {

    @Autowired
    newsMapper newsMapper;

    @Override
    public List<news> findByTag(int tag) {
        return newsMapper.getNewsByTag(tag);
    }

    @Override
    public news findById(int id) {
        return newsMapper.getNewsById(id);
    }
}
